﻿using System.ComponentModel.DataAnnotations;
using Hicap.AuthorizationServer.Core.Models.Base;
using Hicap.AuthorizationServer.Core.Models.Base.Const;

namespace Hicap.AuthorizationServer.Core.Models.Sys
{
    public class Role : EntityBase
    {
        /// <summary>
        /// 角色id
        /// </summary>
        [Required]
        [StringLength(EntityLengthConst.ShortCode)]
        public string RoleCode { get; set; }

        /// <summary>
        /// 角色名
        /// </summary>
        [Required]
        [StringLength(EntityLengthConst.ShortName)]
        public string RoleName { get; set; }

        public virtual Role Parent { get; set; }
    }
}